#pragma once

#include "Goal.h"

namespace Tmpl {

class GoalFollowPath : public Goal
{
public:
	GoalFollowPath(Entity* owner);
	~GoalFollowPath();

	char GetType(){ return Goal::GOAL_FOLLOW_PATH; }

	void ClearPath(){mPathLength = 0; mCurrentSegment=0;}
	void AddPathPoint(Vec2f pos);
	void SetPathPoint(Vec2f pos, int Idx);

	void SetLooping(bool loop){mLoop = loop;}
	bool GetLooping(){return mLoop; }

	void Activate();
	void Process(char threadId);
	void Terminate();
	void Render() const ;

private:
	Vec2f* mPath;
	int mPathLength;
	int mMaxPathLength;
	int mCurrentSegment;
	bool mLoop;
};

}